import {
    MessageOutline,
    UserContactOutline,
    TravelOutline,
    UserOutline
} from 'antd-mobile-icons'

// 路由表
import Main from '../pages/Main'
import Login from '../pages/Login'

import My from '../pages/My'
import WeChat from '../pages/WeChat'
import AddressList from '../pages/AddressList'
import FileView from '../pages/FileView'

export const footerList = [
    {
        path: '/main/weChat',
        element: <WeChat/>,
        title: '微信',
        icon: <MessageOutline fontSize={30} />
    },
    {
        path: '/main/addressList',
        element: <AddressList/>,
        title: '通讯录',
        icon: <UserContactOutline fontSize={30} />
    },
    {
        path: '/main/fileView',
        element: <FileView/>,
        title: '发现',
        icon: <TravelOutline fontSize={30} />
    },
    {
        path: '/main/my',
        element: <My/>,
        title: '我',
        icon: <UserOutline fontSize={30} />
    }
]

const routes = [
    {
        path: '/main',
        element: <Main/>,
        children: [
            ...footerList,
            {
                from: '/main',
                to: '/main/my'
            }
        ]
    },
    {
        path: '/login',
        element: <Login/>
    },
    {
        from: '/',
        to: '/main'
    }
    
]

export default routes;